home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 037a / svgabgi3.zip / SVGA256.H < prev    next >
Text File  |  1991-08-04  |  1KB  |  47 lines

  1. /************************************************/
  2. /*                         */
  3. /*       SuperVGA 256 BGI driver defines    */
  4. /*        Copyright (c) 1991        */
  5. /*        Jordan Hargraphix Software        */
  6. /*                        */
  7. /************************************************/
  8.  
  9. #include <dos.h>
  10.  
  11. typedef unsigned char DacPalette256[256][3];
  12.  
  13. extern int far _Cdecl Svga256_fdriver[];
  14.  
  15. /* These are the currently supported modes */
  16. #define    SVGA320x200x256        0    /* 320x200x256 Standard VGA */
  17. #define    SVGA640x400x256        1    /* 640x400x256 Svga/VESA */
  18. #define    SVGA640x480x256        2    /* 640x480x256 Svga/VESA */
  19. #define    SVGA800x600x256        3    /* 800x600x256 Svga/VESA */
  20. #define SVGA1024x768x256    4    /* 1024x768x256 Svga/VESA */
  21.  
  22. #ifndef XNOR_PUT
  23. #define XNOR_PUT    5
  24. #define NAND_PUT    6
  25. #define NOR_PUT        7
  26. #endif
  27. #define TRANS_COPY_PUT    8
  28.  
  29. /* Setvgapalette256 sets the entire 256 color palette */
  30. /* PalBuf contains RGB values for all 256 colors      */
  31. /* R,G,B values range from 0 to 63                  */
  32. /* Usage:                          */
  33. /*  DacPalette256 dac256;                  */
  34. /*                              */
  35. /* setvgapalette256(&dac256);                  */
  36. void setvgapalette256(DacPalette256 *PalBuf)
  37. {
  38.   struct REGPACK reg;
  39.  
  40.   reg.r_ax = 0x1012;
  41.   reg.r_bx = 0;
  42.   reg.r_cx = 256;
  43.   reg.r_es = FP_SEG(PalBuf);
  44.   reg.r_dx = FP_OFF(PalBuf);
  45.   intr(0x10,®);
  46. }
  47.